Code source

Replicated code from Jenny Trickey’s repo here

Trip/drift: CalCurCEAS_2024_018

Summaries generated: 2025 Jun 10 14:45 UTC

Setup

Load needed libraries.

# load all libraries
devtools::install_github('taikisan21/PAMpal')
library(PAMpal)
# library(kableExtra) # known bug with R ver 4.3.0 so install from github
devtools::install_github('kupietz/kableExtra')
library(kableExtra)
library(ggplot2)
library(RSQLite)
library(tuneR)
# library(wesanderson)
library(here)
library(DBI)

# I don't think we need these but saving here in case
library(dplyr)
# library(tcltk)
# library(manipulate)

Set user-defined variables.

# name project
# ProjID <- 'MHI UxS Glider Project'

# combine trip, recorder, pg version (all defined in YAML) to single run string
# dbFileStr <- paste0(params$mission, '_', params$drift, '_Kogia_', params$pgver)

# define subfolder paths based on selected analysis folder and trip strings
# path_to_db <- file.path(params$path_pg, 'Database')
# path_to_binaries <- file.path(params$path_pg, 'Binaries', params$drift)
path_to_binaries <- choose.dir(default="", caption = "Select path to specific drift main binaries folder")
# assemble some file names
# pamguard database
# dbFile <- file.path(path_to_db, paste0(dbFileStr, '.sqlite3'))
dbFile <- file.choose()
# dbFile <- choose.files(default = "", caption = "Select database file", multi = FALSE)
# already processed acoustic study 'dets' file
detsFile <- file.path(params$path_dets, paste0(params$mission, '_', params$drift,'/', params$mission, '_2024_', params$drift, '_Filtered.rdata'))
detsFiltFile <- file.path(params$path_dets, 
                          paste0(params$mission, '_', params$drift,'/', params$mission, '_2024_', params$drift, '_', params$channelStr, '.rdata'))
# specify calibration file
# calFile <- params$calFile # pull from YAML

# set path to reference spectra if will be used
path_to_refSpec <- file.path(params$path_to_refSpec) # pull from YAML
# specify which reference spectra to plot
# refSpecList = c('Gm', 'Pc')
refSpecList <- params$refSpecList # pull from YAML
refSpecSp <- params$refSpecSp


# ALTERNATIVE SELECT PATHS
# path_pg <- choose.dir(default = "", caption = "Select path to pamguard folder that contains databases and binaries folders")
# # select path to database files 
# path_to_db <- choose.dir(default = "", caption = "Select path to folder with all database files") 
# # select path to specific binary drift file
# path_to_binaries <- choose.dir(default="", caption = "Select path to specific drift main folder")

# # set up datebase driver
# sqlite <- dbDriver("SQLite") # outdated/no longer supported 

# connect to SQLite database using the newer method
con <- dbConnect(RSQLite::SQLite(), dbname = dbFile)

#Set time zone to UTC
Sys.setenv(TZ = 'UTC')

# reference spectra colors - allows for up to 6 ref specs
# pastel
# rsPalette <- c('#66c2a5', '#fc8d62', '#8da0cb', '#e78ac3', 
#                '#a6d854', '#ffd92f')
# bold
rsPalette <- c('#1b9e77', '#d95f02', '#7570b3', '#e7298a', 
               '#66a61e', '#e6ab02')

Define needed functions

Source some external functions

source(here::here('_code/functions', 'loadMultiBinaries.R'))
source(here::here('_code/functions', 'plotContours.R'))
source(here::here('_code/functions', 'clickSummary.R'))
source(here::here('_code/functions', 'whistleSummary.R'))

# if not using Rproj/here package use:
# source(file.path(params$path_code, 'R', 'functions', 'loadMultiBinaries.R'))

Load and prep AcousticStudies

If already created, load an existing dets PAMpal AcousticStudy object for event processing. We need to load both the unfiltered dets and filtered detsFilt AcousticStudies.

# load existing dets AcousticStudy (created with 
# workflow_generate_acousticStudies.R)
# load(detFile)
if (file.exists(detsFile)){
  dets <- readRDS(detsFile)
  cat('Loaded', detsFile, '\n')
} else {
  cat('No AcousticStudy \'dets\' file available', '\n')
}
## Loaded F:/gcp_upload/2_Acoustic-Studies/CalCurCEAS_018/CalCurCEAS_2024_018_Filtered.rdata
if (file.exists(detsFiltFile)){
  detsFilt <- readRDS(detsFiltFile)
  cat('Loaded', detsFiltFile, '\n')
} else {
  cat('No AcousticStudy \'detsFilt\' file available', '\n')
}
## Loaded F:/gcp_upload/2_Acoustic-Studies/CalCurCEAS_018/CalCurCEAS_2024_018_ch1.rdata
# summarize how many events
nEvents <- length(names(PAMpal::events(dets)))
# number of events may change after filtering (all clicks may be filtered out)
nEventsFilt <- length(names(PAMpal::events(detsFilt)))

Loaded F:/gcp_upload/2_Acoustic-Studies/CalCurCEAS_018/CalCurCEAS_2024_018_Filtered.rdata and F:/gcp_upload/2_Acoustic-Studies/CalCurCEAS_018/CalCurCEAS_2024_018_ch1.rdata

## Updated the locations of 1 out of 1 missing database files. 
## Updated the locations of 6005 out of 6005 missing binary files. 
## Updating files in events...
##   |                                                                                          |                                                                                  |   0%  |                                                                                          |                                                                                  |   1%  |                                                                                          |=                                                                                 |   1%  |                                                                                          |=                                                                                 |   2%  |                                                                                          |==                                                                                |   2%  |                                                                                          |==                                                                                |   3%  |                                                                                          |===                                                                               |   3%  |                                                                                          |===                                                                               |   4%  |                                                                                          |====                                                                              |   4%  |                                                                                          |====                                                                              |   5%  |                                                                                          |=====                                                                             |   6%  |                                                                                          |=====                                                                             |   7%  |                                                                                          |======                                                                            |   7%  |                                                                                          |======                                                                            |   8%  |                                                                                          |=======                                                                           |   8%  |                                                                                          |=======                                                                           |   9%  |                                                                                          |========                                                                          |   9%  |                                                                                          |========                                                                          |  10%  |                                                                                          |=========                                                                         |  10%  |                                                                                          |=========                                                                         |  11%  |                                                                                          |=========                                                                         |  12%  |                                                                                          |==========                                                                        |  12%  |                                                                                          |==========                                                                        |  13%  |                                                                                          |===========                                                                       |  13%  |                                                                                          |===========                                                                       |  14%  |                                                                                          |============                                                                      |  14%  |                                                                                          |============                                                                      |  15%  |                                                                                          |=============                                                                     |  15%  |                                                                                          |=============                                                                     |  16%  |                                                                                          |==============                                                                    |  17%  |                                                                                          |==============                                                                    |  18%  |                                                                                          |===============                                                                   |  18%  |                                                                                          |===============                                                                   |  19%  |                                                                                          |================                                                                  |  19%  |                                                                                          |================                                                                  |  20%  |                                                                                          |=================                                                                 |  20%  |                                                                                          |=================                                                                 |  21%  |                                                                                          |==================                                                                |  21%  |                                                                                          |==================                                                                |  22%  |                                                                                          |===================                                                               |  23%  |                                                                                          |===================                                                               |  24%  |                                                                                          |====================                                                              |  24%  |                                                                                          |====================                                                              |  25%  |                                                                                          |=====================                                                             |  25%  |                                                                                          |=====================                                                             |  26%  |                                                                                          |======================                                                            |  26%  |                                                                                          |======================                                                            |  27%  |                                                                                          |=======================                                                           |  27%  |                                                                                          |=======================                                                           |  28%  |                                                                                          |=======================                                                           |  29%  |                                                                                          |========================                                                          |  29%  |                                                                                          |========================                                                          |  30%  |                                                                                          |=========================                                                         |  30%  |                                                                                          |=========================                                                         |  31%  |                                                                                          |==========================                                                        |  31%  |                                                                                          |==========================                                                        |  32%  |                                                                                          |===========================                                                       |  32%  |                                                                                          |===========================                                                       |  33%  |                                                                                          |============================                                                      |  34%  |                                                                                          |============================                                                      |  35%  |                                                                                          |=============================                                                     |  35%  |                                                                                          |=============================                                                     |  36%  |                                                                                          |==============================                                                    |  36%  |                                                                                          |==============================                                                    |  37%  |                                                                                          |===============================                                                   |  37%  |                                                                                          |===============================                                                   |  38%  |                                                                                          |================================                                                  |  38%  |                                                                                          |================================                                                  |  39%  |                                                                                          |================================                                                  |  40%  |                                                                                          |=================================                                                 |  40%  |                                                                                          |=================================                                                 |  41%  |                                                                                          |==================================                                                |  41%  |                                                                                          |==================================                                                |  42%  |                                                                                          |===================================                                               |  42%  |                                                                                          |===================================                                               |  43%  |                                                                                          |====================================                                              |  43%  |                                                                                          |====================================                                              |  44%  |                                                                                          |=====================================                                             |  45%  |                                                                                          |=====================================                                             |  46%  |                                                                                          |======================================                                            |  46%  |                                                                                          |======================================                                            |  47%  |                                                                                          |=======================================                                           |  47%  |                                                                                          |=======================================                                           |  48%  |                                                                                          |========================================                                          |  48%  |                                                                                          |========================================                                          |  49%  |                                                                                          |=========================================                                         |  49%  |                                                                                          |=========================================                                         |  50%  |                                                                                          |=========================================                                         |  51%  |                                                                                          |==========================================                                        |  51%  |                                                                                          |==========================================                                        |  52%  |                                                                                          |===========================================                                       |  52%  |                                                                                          |===========================================                                       |  53%  |                                                                                          |============================================                                      |  53%  |                                                                                          |============================================                                      |  54%  |                                                                                          |=============================================                                     |  54%  |                                                                                          |=============================================                                     |  55%  |                                                                                          |==============================================                                    |  56%  |                                                                                          |==============================================                                    |  57%  |                                                                                          |===============================================                                   |  57%  |                                                                                          |===============================================                                   |  58%  |                                                                                          |================================================                                  |  58%  |                                                                                          |================================================                                  |  59%  |                                                                                          |=================================================                                 |  59%  |                                                                                          |=================================================                                 |  60%  |                                                                                          |==================================================                                |  60%  |                                                                                          |==================================================                                |  61%  |                                                                                          |==================================================                                |  62%  |                                                                                          |===================================================                               |  62%  |                                                                                          |===================================================                               |  63%  |                                                                                          |====================================================                              |  63%  |                                                                                          |====================================================                              |  64%  |                                                                                          |=====================================================                             |  64%  |                                                                                          |=====================================================                             |  65%  |                                                                                          |======================================================                            |  65%  |                                                                                          |======================================================                            |  66%  |                                                                                          |=======================================================                           |  67%  |                                                                                          |=======================================================                           |  68%  |                                                                                          |========================================================                          |  68%  |                                                                                          |========================================================                          |  69%  |                                                                                          |=========================================================                         |  69%  |                                                                                          |=========================================================                         |  70%  |                                                                                          |==========================================================                        |  70%  |                                                                                          |==========================================================                        |  71%  |                                                                                          |===========================================================                       |  71%  |                                                                                          |===========================================================                       |  72%  |                                                                                          |===========================================================                       |  73%  |                                                                                          |============================================================                      |  73%  |                                                                                          |============================================================                      |  74%  |                                                                                          |=============================================================                     |  74%  |                                                                                          |=============================================================                     |  75%  |                                                                                          |==============================================================                    |  75%  |                                                                                          |==============================================================                    |  76%  |                                                                                          |===============================================================                   |  76%  |                                                                                          |===============================================================                   |  77%  |                                                                                          |================================================================                  |  78%  |                                                                                          |================================================================                  |  79%  |                                                                                          |=================================================================                 |  79%  |                                                                                          |=================================================================                 |  80%  |                                                                                          |==================================================================                |  80%  |                                                                                          |==================================================================                |  81%  |                                                                                          |===================================================================               |  81%  |                                                                                          |===================================================================               |  82%  |                                                                                          |====================================================================              |  82%  |                                                                                          |====================================================================              |  83%  |                                                                                          |=====================================================================             |  84%  |                                                                                          |=====================================================================             |  85%  |                                                                                          |======================================================================            |  85%  |                                                                                          |======================================================================            |  86%  |                                                                                          |=======================================================================           |  86%  |                                                                                          |=======================================================================           |  87%  |                                                                                          |========================================================================          |  87%  |                                                                                          |========================================================================          |  88%  |                                                                                          |=========================================================================         |  88%  |                                                                                          |=========================================================================         |  89%  |                                                                                          |=========================================================================         |  90%  |                                                                                          |==========================================================================        |  90%  |                                                                                          |==========================================================================        |  91%  |                                                                                          |===========================================================================       |  91%  |                                                                                          |===========================================================================       |  92%  |                                                                                          |============================================================================      |  92%  |                                                                                          |============================================================================      |  93%  |                                                                                          |=============================================================================     |  93%  |                                                                                          |=============================================================================     |  94%  |                                                                                          |==============================================================================    |  95%  |                                                                                          |==============================================================================    |  96%  |                                                                                          |===============================================================================   |  96%  |                                                                                          |===============================================================================   |  97%  |                                                                                          |================================================================================  |  97%  |                                                                                          |================================================================================  |  98%  |                                                                                          |================================================================================= |  98%  |                                                                                          |================================================================================= |  99%  |                                                                                          |==================================================================================|  99%  |                                                                                          |==================================================================================| 100%
## Updated the locations of 1 out of 1 missing database files. 
## Updated the locations of 6005 out of 6005 missing binary files. 
## Updating files in events...
##   |                                                                                          |                                                                                  |   0%  |                                                                                          |                                                                                  |   1%  |                                                                                          |=                                                                                 |   1%  |                                                                                          |=                                                                                 |   2%  |                                                                                          |==                                                                                |   2%  |                                                                                          |==                                                                                |   3%  |                                                                                          |===                                                                               |   3%  |                                                                                          |===                                                                               |   4%  |                                                                                          |====                                                                              |   4%  |                                                                                          |====                                                                              |   5%  |                                                                                          |=====                                                                             |   6%  |                                                                                          |=====                                                                             |   7%  |                                                                                          |======                                                                            |   7%  |                                                                                          |======                                                                            |   8%  |                                                                                          |=======                                                                           |   8%  |                                                                                          |=======                                                                           |   9%  |                                                                                          |========                                                                          |   9%  |                                                                                          |========                                                                          |  10%  |                                                                                          |=========                                                                         |  10%  |                                                                                          |=========                                                                         |  11%  |                                                                                          |=========                                                                         |  12%  |                                                                                          |==========                                                                        |  12%  |                                                                                          |==========                                                                        |  13%  |                                                                                          |===========                                                                       |  13%  |                                                                                          |===========                                                                       |  14%  |                                                                                          |============                                                                      |  14%  |                                                                                          |============                                                                      |  15%  |                                                                                          |=============                                                                     |  15%  |                                                                                          |=============                                                                     |  16%  |                                                                                          |==============                                                                    |  17%  |                                                                                          |==============                                                                    |  18%  |                                                                                          |===============                                                                   |  18%  |                                                                                          |===============                                                                   |  19%  |                                                                                          |================                                                                  |  19%  |                                                                                          |================                                                                  |  20%  |                                                                                          |=================                                                                 |  20%  |                                                                                          |=================                                                                 |  21%  |                                                                                          |==================                                                                |  21%  |                                                                                          |==================                                                                |  22%  |                                                                                          |===================                                                               |  23%  |                                                                                          |===================                                                               |  24%  |                                                                                          |====================                                                              |  24%  |                                                                                          |====================                                                              |  25%  |                                                                                          |=====================                                                             |  25%  |                                                                                          |=====================                                                             |  26%  |                                                                                          |======================                                                            |  26%  |                                                                                          |======================                                                            |  27%  |                                                                                          |=======================                                                           |  27%  |                                                                                          |=======================                                                           |  28%  |                                                                                          |=======================                                                           |  29%  |                                                                                          |========================                                                          |  29%  |                                                                                          |========================                                                          |  30%  |                                                                                          |=========================                                                         |  30%  |                                                                                          |=========================                                                         |  31%  |                                                                                          |==========================                                                        |  31%  |                                                                                          |==========================                                                        |  32%  |                                                                                          |===========================                                                       |  32%  |                                                                                          |===========================                                                       |  33%  |                                                                                          |============================                                                      |  34%  |                                                                                          |============================                                                      |  35%  |                                                                                          |=============================                                                     |  35%  |                                                                                          |=============================                                                     |  36%  |                                                                                          |==============================                                                    |  36%  |                                                                                          |==============================                                                    |  37%  |                                                                                          |===============================                                                   |  37%  |                                                                                          |===============================                                                   |  38%  |                                                                                          |================================                                                  |  38%  |                                                                                          |================================                                                  |  39%  |                                                                                          |================================                                                  |  40%  |                                                                                          |=================================                                                 |  40%  |                                                                                          |=================================                                                 |  41%  |                                                                                          |==================================                                                |  41%  |                                                                                          |==================================                                                |  42%  |                                                                                          |===================================                                               |  42%  |                                                                                          |===================================                                               |  43%  |                                                                                          |====================================                                              |  43%  |                                                                                          |====================================                                              |  44%  |                                                                                          |=====================================                                             |  45%  |                                                                                          |=====================================                                             |  46%  |                                                                                          |======================================                                            |  46%  |                                                                                          |======================================                                            |  47%  |                                                                                          |=======================================                                           |  47%  |                                                                                          |=======================================                                           |  48%  |                                                                                          |========================================                                          |  48%  |                                                                                          |========================================                                          |  49%  |                                                                                          |=========================================                                         |  49%  |                                                                                          |=========================================                                         |  50%  |                                                                                          |=========================================                                         |  51%  |                                                                                          |==========================================                                        |  51%  |                                                                                          |==========================================                                        |  52%  |                                                                                          |===========================================                                       |  52%  |                                                                                          |===========================================                                       |  53%  |                                                                                          |============================================                                      |  53%  |                                                                                          |============================================                                      |  54%  |                                                                                          |=============================================                                     |  54%  |                                                                                          |=============================================                                     |  55%  |                                                                                          |==============================================                                    |  56%  |                                                                                          |==============================================                                    |  57%  |                                                                                          |===============================================                                   |  57%  |                                                                                          |===============================================                                   |  58%  |                                                                                          |================================================                                  |  58%  |                                                                                          |================================================                                  |  59%  |                                                                                          |=================================================                                 |  59%  |                                                                                          |=================================================                                 |  60%  |                                                                                          |==================================================                                |  60%  |                                                                                          |==================================================                                |  61%  |                                                                                          |==================================================                                |  62%  |                                                                                          |===================================================                               |  62%  |                                                                                          |===================================================                               |  63%  |                                                                                          |====================================================                              |  63%  |                                                                                          |====================================================                              |  64%  |                                                                                          |=====================================================                             |  64%  |                                                                                          |=====================================================                             |  65%  |                                                                                          |======================================================                            |  65%  |                                                                                          |======================================================                            |  66%  |                                                                                          |=======================================================                           |  67%  |                                                                                          |=======================================================                           |  68%  |                                                                                          |========================================================                          |  68%  |                                                                                          |========================================================                          |  69%  |                                                                                          |=========================================================                         |  69%  |                                                                                          |=========================================================                         |  70%  |                                                                                          |==========================================================                        |  70%  |                                                                                          |==========================================================                        |  71%  |                                                                                          |===========================================================                       |  71%  |                                                                                          |===========================================================                       |  72%  |                                                                                          |===========================================================                       |  73%  |                                                                                          |============================================================                      |  73%  |                                                                                          |============================================================                      |  74%  |                                                                                          |=============================================================                     |  74%  |                                                                                          |=============================================================                     |  75%  |                                                                                          |==============================================================                    |  75%  |                                                                                          |==============================================================                    |  76%  |                                                                                          |===============================================================                   |  76%  |                                                                                          |===============================================================                   |  77%  |                                                                                          |================================================================                  |  78%  |                                                                                          |================================================================                  |  79%  |                                                                                          |=================================================================                 |  79%  |                                                                                          |=================================================================                 |  80%  |                                                                                          |==================================================================                |  80%  |                                                                                          |==================================================================                |  81%  |                                                                                          |===================================================================               |  81%  |                                                                                          |===================================================================               |  82%  |                                                                                          |====================================================================              |  82%  |                                                                                          |====================================================================              |  83%  |                                                                                          |=====================================================================             |  84%  |                                                                                          |=====================================================================             |  85%  |                                                                                          |======================================================================            |  85%  |                                                                                          |======================================================================            |  86%  |                                                                                          |=======================================================================           |  86%  |                                                                                          |=======================================================================           |  87%  |                                                                                          |========================================================================          |  87%  |                                                                                          |========================================================================          |  88%  |                                                                                          |=========================================================================         |  88%  |                                                                                          |=========================================================================         |  89%  |                                                                                          |=========================================================================         |  90%  |                                                                                          |==========================================================================        |  90%  |                                                                                          |==========================================================================        |  91%  |                                                                                          |===========================================================================       |  91%  |                                                                                          |===========================================================================       |  92%  |                                                                                          |============================================================================      |  92%  |                                                                                          |============================================================================      |  93%  |                                                                                          |=============================================================================     |  93%  |                                                                                          |=============================================================================     |  94%  |                                                                                          |==============================================================================    |  95%  |                                                                                          |==============================================================================    |  96%  |                                                                                          |===============================================================================   |  96%  |                                                                                          |===============================================================================   |  97%  |                                                                                          |================================================================================  |  97%  |                                                                                          |================================================================================  |  98%  |                                                                                          |================================================================================= |  98%  |                                                                                          |================================================================================= |  99%  |                                                                                          |==================================================================================|  99%  |                                                                                          |==================================================================================| 100%

Updated file paths to binaries in databases for F:/gcp_upload/2_Acoustic-Studies/CalCurCEAS_018/CalCurCEAS_2024_018_Filtered.rdata and F:/gcp_upload/2_Acoustic-Studies/CalCurCEAS_018/CalCurCEAS_2024_018_ch1.rdata

Create initial output Event Table CSV

To be used for manual scoring based on report figures.

# set up output data frame
evTable <- data.frame(drift = character(nEvents), id = character(nEvents), 
                      species = character(nEvents), numClicks = numeric(nEvents))
# populate with drift string and event names
evTable$drift <- paste0(params$mission, '_', params$drift)
evTable$id <- names(PAMpal::events(detsFilt))

# get all click data
allClks <- PAMpal::getClickData(detsFilt)
# get the number of clicks for each event
for (iEvent in c(1:nEventsFilt)){
  evTable$numClicks[iEvent] <- length(which(allClks$eventId == evTable$id[iEvent]))
}

# keep only rows/events with at least 200 clicks
evTable <- evTable[which(evTable$numClicks >199),]

# add column for keeping/removing based on median peak frequency
evTable$keep <- FALSE # set all to false, will mark keepers as TRUE in loop

# save event table as CSV
write.csv(evTable, file = file.path(params$path_dets,
                                    paste0('eventTable_', params$mission, '_',
                                           params$drift, '_', Sys.Date(),'.csv')))

1121 events (files) in drift. 92 events have at least 200 clicks. Additional events may be removed if the median peak frequency of all high SNR clicks is less than 6 kHz. The final number of events can be found at the very end of the report.

Load reference spectra, if specified

Load the reference spectra for plotting, if set with refSpecList.

# refSpecList is specified in YAML params. Can be one or multiple species
# for single species specify as char string without quotations e.g., refSpecPc
# for multiple species, specify with call to R and c()
#     e.g., !r c('meanSpecGm', 'refSpecPc_LLHARP')

refSpecs <- NULL
if (!is.null(refSpecList)){
  refSpecs = list()
  for (rs in refSpecList){
    refSpecs[[rs]] = read.csv(file.path(path_to_refSpec, paste0(rs, '.csv')))
  }
}

Event summaries

Loop through each detection event (n = 92) create plots and a table of summary statistics for click and whistle detections. This process uses AcousticStudy objects that have detection data for each event, and also pulls information from the Pamguard binaries associated with each AcousticStudy.

Click plots (other than the SNR plot) only show clicks with SNRs >= 15 dB.

for (iEvent in c(1:nEventsFilt)){
  # iEvent = 6 # for testing
  # ("pagebreak \n")
  
  # extract this event UID string
  eventList <- PAMpal::events(detsFilt)
  eventUID <- names(eventList)[iEvent]
  
  ###### summarize clicks ######
  cl <- clickSummary(detsFilt, eventUID) 
  
  if ((cl$nClicks > 199) && median(cl$goodClicks$peak, na.rm = TRUE) >= 6){
    # keep this in evTable
    evTable$keep[evTable$id == eventUID] <- TRUE
    evTable$medPeakFrq[evTable$id == eventUID] <- median(cl$goodClicks$peak, 
                                                         na.rm = TRUE)
    
    # set header for this event and print time
    cat('\n\n#### Event ID:   ', names(eventList)[iEvent], '\n')
    cat('Time:   ', format(eventList[[eventUID]]@ancillary$grouping$start, 
                           '%Y-%m-%d %H:%M%Z'), ' to ', 
        format(eventList[[eventUID]]@ancillary$grouping$end, '%Y-%m-%d %H:%M%Z'), 
        '\n')
    
    cat('\nEvent contains', nrow(PAMpal::getClickData(dets[[eventUID]])), 
        'original clicks,', paste0('**', cl$nClicks), 'valid clicks** after',
        'filtering.\n')
    cat('\n')
    
    ###### summarize whistles ######
    # wl <- whistleSummary(detsFilt, eventUID)
    # 
    # cat('\nEvent contains', paste0('**', wl$nWhistles), 'whistles**.\n')
    # cat('\n')
    
    ###### click plots and table ######
    
    cat('\n##### Click plots and table\n')
    cat('\n SNR histogram includes all filtered clicks. Other plots contain only', 
        'clicks with SNR >= 15 dB', paste0('(**n = ', cl$nGoodClicks, ' clicks**)'),
        '.\n')
    cat('\n')
    
    
    # if any clicks...
    if (cl$nClicks > 0){
      # histogram of all clicks and SNR >= 15 dB cut off
      xMax <- max(c(15, ceiling(max(cl$snr)) + 2)) # whichever is bigger
      if (any(!is.na(cl$snr))){
        hist(cl$snr, breaks = seq(from = floor(min(cl$snr)), 
                                  to = xMax, by = 2), 
             main = 'Click SNR', sub = '(all filtered clicks)', xlab = 'SNR')
        abline(v = 15, lty = 2, lwd = 2, col = 'red4')
      }
      
    }
    
    # if sufficient good clicks...
    if (cl$nGoodClicks > 0) {
      # histogram of click durations - good clicks only
      subStr <- paste0('(high SNR clicks, n=', cl$nGoodClicks, ')')
      hist(cl$goodClicks$duration, 
           breaks = seq(from = 0, to = max(cl$goodClicks$duration) + 100, 
                        by = 100), main = 'Click duration', sub = subStr,
           xlab = expression(paste('duration [', mu, 's]')))
      abline(v = median(cl$goodClicks$duration), lty = 2, lwd = 2, col = 'black')
      legend('topright', legend = 'median', lty = 2, lwd = 2, col = 'black')
      
      
      cat('\n')
      cat('\n')
      
      
      # Calculate and plot Concatenated and Mean Spectrum for clicks w/ max SNR > 15dB
      # NB: JLKM uses more exaggerated SNR (>40 dB) for BWs bc actual spectra may
      # be noisy for single clicks
      # reducing wl can give more accurate noise floor but 'smoother' spectrum
      # increasing wl will give more exact spectrum but may exclude too many 
      # clicks based on SNR (noise measure will overlap with click output; noise
      # is just measured as same wl from start of binary snippet and binaries 
      # binary snippets are v short)
      # Trial and error - 256 works ok for LLHARP data = 1.28 ms
      # NB: JLKM uses 500 for beaked whales with samp rate 288k
      avgSpec <- PAMpal::calculateAverageSpectra(detsFilt, evNum = eventUID, wl = 256, 
                                         channel = params$channelNum, norm = TRUE,
                                         noise = TRUE, sort = TRUE, snr = 15, 
                                         plot = c(TRUE, FALSE))
      # concatenated spectrogram will get plotted within calculation
      
      # avg spectrum plots separately (bc adding stuff)
      if (!is.null(avgSpec)) {
        # Peak freq as calculated by calculateAvgerageSpectra -for subtitle
        peakFreq <- round(avgSpec$freq[which.max(avgSpec$avgSpec)]/1000, 2)
        
        plot(1, type = 'n', xlim = c(0, 100), ylim = c(min(avgSpec$avgSpec), 0), 
             xlab = 'Frequency (kHz)', ylab = 'Normalized Magnitude (dB)', 
             main = 'Average Spectrum', sub = paste0('Peak: ', peakFreq, 'kHz'))
        # add grid lines for frequency at 10 kHz intervals
        for (iline in ((0:20)*10)) {lines(c(iline,iline), c(-100,10), col="gray")}
        # add template spectra
        if (length(refSpecs) > 0){
          rsCols <- rsPalette[1:length(refSpecs)]
          for (rs in 1:length(refSpecs)){
            rsTmp <- refSpecList[rs]
            rsNorm <- refSpecs[[rsTmp]]
            rsMax <- max(rsNorm$dB)
            rsNorm$dBNorm <- rsNorm$dB - rsMax
            lines(rsNorm$frq, rsNorm$dBNorm, col = rsCols[rs], lwd = 2)
          }
        }
        
        # plot noise
        lines(avgSpec$freq/1000, avgSpec$avgNoise, lty = 3, lwd = 2)
        # plot avg spectrum
        lines(avgSpec$freq/1000, avgSpec$avgSpec, lty = 2, lwd = 3)
        # also plot median spectrum
        medSpec <- 20*log10(apply(avgSpec$allSpec, 1, function(y) {
          median(10^(y/20), na.rm = TRUE)}))
        medSpecNorm <- medSpec - max(medSpec, na.rm = TRUE)
        lines(avgSpec$freq/1000, medSpecNorm, lty = 1, lwd = 3)
        
        # add legend
        if (length(refSpecs) > 0){
          legend(x = 'topright', c(refSpecSp, 'Avg.', 'Med.', 'Noise'),
                 lty = c(rep(1, length(refSpecs)), 2, 1, 3),
                 lwd = c(rep(1, length(refSpecs)), 2, 3, 2),
                 col = c(rsCols, 'black', 'black', 'black'), cex = 0.8)
        } else if (length(refSpecs) == 0){
          legend(x = 'topright', c('Avg.', 'Med.', 'Noise'),
                 lty = c(2, 1, 3), lwd = c(2, 3, 2),
                 col = c('black', 'black', 'black'), cex = 0.8)
        }
      }
      
      
      # NB: JLKM BW approach has additional plots here:
      # IPI
      # Waveform of strongest click
      # Wigner plot
      # We are not including those here because not really useful for FKW, but if
      # interested in adding back in, see:
      #       https://github.com/jlkeating/PAMGuard_Event_Code
      
      
      cat('\n')
      cat('\n')
      
      
      # create median stats table for clicks with -15 dB TK noise cut off
      cat('\n\n Median statistics for', cl$nGoodClicks, 'high SNR clicks with', 
          'SNR >= 15 dB.')
      cat('\n')
      
      cat(knitr::kable(cl$mt, format = 'html', caption = '', align = 'l', 
                       row.names = FALSE) %>%
            kableExtra::kable_styling(bootstrap_options = c('basic', 'condensed'),
                          full_width = F))
      
    }  else { # no good clicks so no summary plots/table
      cat('\nNo clicks of sufficient SNR to plot or summarize.\n')
    }
    
    
    ###### whistle plots and table ######
    # 
    # cat('\n##### Whistle plots and table\n')
    # 
    # # if whistles present ...
    # if (wl$nWhistles > 0) {
    #   # create median stats table for all whistles
    #   # cat('\n\n Median statistics for', wl$nWhistles, 'whistles.')
    #   # cat('\n')
    #   
    #   # plot whistle contours
    #   # map the needed binary files
    #   binFiles <- dets@events[[eventUID]]@files$binaries
    #   wmFileIdx <- grep(pattern = '^.*WhistlesMoans_Whistle_and_Moan.*\\.pgdf$',
    #                     binFiles)
    #   wmFiles <- dets@events[[eventUID]]@files$binaries[wmFileIdx]
    #   
    #   # load them
    #   whBin <- loadMultiBinaries(wmFiles)
    #   # trim to just the event time
    #   whBinEv <- whBin[names(whBin) %in%
    #                      detsFilt[[eventUID]]$Whistle_and_Moan_Detector$UID]
    #   
    #   # #plot - ggplot version/functionized
    #   # pc <- plotContours(whBinEv)
    #   # # print(pc)
    #   # pc + ggtitle(eventUID)
    #   # 
    #   
    #   # get plot limits
    #   # xMax <- 0
    #   # yMax <- 0
    #   # for (wc in 1:length(names(whBinEv))){
    #   #   df <- data.frame(time = whBinEv[[wc]]$time - whBinEv[[wc]]$time[1],
    #   #                    freq = whBinEv[[wc]]$freq/1000)
    #   #   xMaxTmp <- max(df$time)
    #   #   yMaxTmp <- max(df$freq)
    #   #   if (xMaxTmp > xMax){xMax <- xMaxTmp}
    #   #   if (yMaxTmp > yMax){yMax <- yMaxTmp}
    #   # }
    #   # or use standard max lims
    #   xMax <- 1.5
    #   yMax <- 20
    #   
    #   # plot each line
    #   plot(1, type = 'n', xlim = c(0, round(xMax,2)), ylim = c(0, round(yMax,-1)), 
    #        xlab = 'Time (s)', ylab = 'Frequency (kHz)', 
    #        main = 'Whistle Contours')
    #   # add grid lines for frequency at 0.125 s and 5 kHz intervals
    #   for (iline in (seq(0,2,0.125))) {lines(c(iline,iline), c(-10,60),
    #                                          col="lightgray")}
    #   for (iline in (seq(0,50,5))) {lines(c(-0.5,2.5), c(iline,iline),
    #                                       col="lightgray")}
    #   # loop through each contour
    #   for (wc in 1:length(names(whBinEv))){
    #     df <- data.frame(time = whBinEv[[wc]]$time - whBinEv[[wc]]$time[1],
    #                      freq = whBinEv[[wc]]$freq/1000)
    #     lines(df$time, df$freq, col = rgb(0,0,0,0.4))
    #   }
    #   
    #   # plot histogram of median frequency
    #   hist(wl$wh$freqMedian/1000, 
    #        breaks = seq(0, ceiling(max(wl$wh$freqMedian/1000)) + 1, 1),
    #        main = 'Histogram of whistle median frequency', 
    #        xlab = 'Median frequency (kHz)')
    #   
    #   cat('\n')
    #   cat('\n')
    #   
    #   cat('Median statistics for n = ', wl$nWhistles, 'whistles.\n')
    #   # create median stats table for all whistles
    #   cat(knitr::kable(wl$mt, format = 'html', caption = '', align = 'l', 
    #                    row.names = FALSE) %>%
    #         kable_styling(bootstrap_options = c('basic', 'condensed'),
    #                       full_width = F))
    #   
    # } else {
    #   cat('\nNo whistles present.\n')
    # }
    
    cat('\n')
    cat('\n\n --- \n\n')
    cat('\n')
  }# num clicks/peak freq check 
} # loop

Event ID: 7930.241007043600.wav

Time: 2024-10-07 04:36UTC to 2024-10-07 04:42UTC

Event contains 506 original clicks, 253 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 192 clicks) .

Median statistics for 192 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.08
Median 10dB Center Frequency [kHz] 5.92
Median 3dB Bandwidth [kHz] (lower-upper) 1.1 (5.52 - 6.64)
Median 10dB Bandwidth [kHz] (lower-upper) 2.65 (4.61 - 7.26)
Median duration [μs] (25-75 percentile) 536 (166 - 1008)

Event ID: 7930.241007045400.wav

Time: 2024-10-07 04:54UTC to 2024-10-07 04:59UTC

Event contains 694 original clicks, 347 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 298 clicks) .

Median statistics for 298 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.03
Median 10dB Center Frequency [kHz] 5.93
Median 3dB Bandwidth [kHz] (lower-upper) 1.11 (5.41 - 6.66)
Median 10dB Bandwidth [kHz] (lower-upper) 2.78 (4.44 - 7.34)
Median duration [μs] (25-75 percentile) 1019 (408 - 1330)

Event ID: 7930.241007050000.wav

Time: 2024-10-07 05:00UTC to 2024-10-07 05:06UTC

Event contains 2594 original clicks, 1297 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 802 clicks) .

Median statistics for 802 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.9
Median 10dB Center Frequency [kHz] 5.83
Median 3dB Bandwidth [kHz] (lower-upper) 1.03 (5.33 - 6.48)
Median 10dB Bandwidth [kHz] (lower-upper) 2.46 (4.53 - 7.12)
Median duration [μs] (25-75 percentile) 473 (118 - 1000)

Event ID: 7930.241007064200.wav

Time: 2024-10-07 06:42UTC to 2024-10-07 06:48UTC

Event contains 608 original clicks, 304 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 146 clicks) .

Median statistics for 146 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 7.2
Median 3dB Center Frequency [kHz] 6.8
Median 10dB Center Frequency [kHz] 6.77
Median 3dB Bandwidth [kHz] (lower-upper) 0.945 (6.27 - 7.5)
Median 10dB Bandwidth [kHz] (lower-upper) 2.77 (5.13 - 8.45)
Median duration [μs] (25-75 percentile) 748 (198 - 1313)

Event ID: 7930.241007064800.wav

Time: 2024-10-07 06:48UTC to 2024-10-07 06:54UTC

Event contains 994 original clicks, 497 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 245 clicks) .

Median statistics for 245 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.08
Median 10dB Center Frequency [kHz] 6.05
Median 3dB Bandwidth [kHz] (lower-upper) 0.988 (5.56 - 6.64)
Median 10dB Bandwidth [kHz] (lower-upper) 2.5 (4.73 - 7.4)
Median duration [μs] (25-75 percentile) 1142 (344 - 1986)

Event ID: 7930.241007065400.wav

Time: 2024-10-07 06:54UTC to 2024-10-07 07:00UTC

Event contains 592 original clicks, 296 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 162 clicks) .

Median statistics for 162 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.13
Median 10dB Center Frequency [kHz] 6.01
Median 3dB Bandwidth [kHz] (lower-upper) 0.93 (5.65 - 6.63)
Median 10dB Bandwidth [kHz] (lower-upper) 2.31 (4.73 - 7.29)
Median duration [μs] (25-75 percentile) 1241 (499 - 2092)

Event ID: 7930.241007070000.wav

Time: 2024-10-07 07:00UTC to 2024-10-07 07:06UTC

Event contains 588 original clicks, 294 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 162 clicks) .

Median statistics for 162 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.09
Median 10dB Center Frequency [kHz] 5.95
Median 3dB Bandwidth [kHz] (lower-upper) 0.904 (5.58 - 6.6)
Median 10dB Bandwidth [kHz] (lower-upper) 2.54 (4.66 - 7.29)
Median duration [μs] (25-75 percentile) 1204 (409 - 2095)

Event ID: 7930.241007070600.wav

Time: 2024-10-07 07:06UTC to 2024-10-07 07:11UTC

Event contains 1044 original clicks, 522 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 325 clicks) .

Median statistics for 325 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.97
Median 10dB Center Frequency [kHz] 5.82
Median 3dB Bandwidth [kHz] (lower-upper) 0.98 (5.37 - 6.55)
Median 10dB Bandwidth [kHz] (lower-upper) 2.53 (4.46 - 7.12)
Median duration [μs] (25-75 percentile) 941 (258 - 1694)

Event ID: 7930.241007072400.wav

Time: 2024-10-07 07:24UTC to 2024-10-07 07:30UTC

Event contains 1702 original clicks, 851 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 504 clicks) .

Median statistics for 504 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.9
Median 10dB Center Frequency [kHz] 5.86
Median 3dB Bandwidth [kHz] (lower-upper) 1.04 (5.19 - 6.47)
Median 10dB Bandwidth [kHz] (lower-upper) 2.62 (4.38 - 7.19)
Median duration [μs] (25-75 percentile) 1375 (1000 - 2167)

Event ID: 7930.241007073600.wav

Time: 2024-10-07 07:36UTC to 2024-10-07 07:42UTC

Event contains 452 original clicks, 226 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 132 clicks) .

Median statistics for 132 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.74
Median 10dB Center Frequency [kHz] 5.75
Median 3dB Bandwidth [kHz] (lower-upper) 1.02 (5.11 - 6.34)
Median 10dB Bandwidth [kHz] (lower-upper) 2.49 (4.41 - 6.99)
Median duration [μs] (25-75 percentile) 914 (356 - 1992)

Event ID: 7930.241007074800.wav

Time: 2024-10-07 07:48UTC to 2024-10-07 07:54UTC

Event contains 452 original clicks, 226 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 116 clicks) .

Median statistics for 116 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 7.2
Median 3dB Center Frequency [kHz] 6.74
Median 10dB Center Frequency [kHz] 7.16
Median 3dB Bandwidth [kHz] (lower-upper) 1.02 (6.25 - 7.16)
Median 10dB Bandwidth [kHz] (lower-upper) 3.44 (5.35 - 8.69)
Median duration [μs] (25-75 percentile) 386 (113 - 1000)

Event ID: 7930.241007075400.wav

Time: 2024-10-07 07:54UTC to 2024-10-07 07:59UTC

Event contains 926 original clicks, 463 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 294 clicks) .

Median statistics for 294 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.4
Median 3dB Center Frequency [kHz] 6.27
Median 10dB Center Frequency [kHz] 6.05
Median 3dB Bandwidth [kHz] (lower-upper) 1.1 (5.62 - 6.84)
Median 10dB Bandwidth [kHz] (lower-upper) 2.84 (4.58 - 7.55)
Median duration [μs] (25-75 percentile) 547 (172 - 1031)

Event ID: 7930.241007082400.wav

Time: 2024-10-07 08:24UTC to 2024-10-07 08:30UTC

Event contains 1176 original clicks, 588 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 306 clicks) .

Median statistics for 306 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.87
Median 10dB Center Frequency [kHz] 5.82
Median 3dB Bandwidth [kHz] (lower-upper) 0.952 (5.36 - 6.37)
Median 10dB Bandwidth [kHz] (lower-upper) 2.43 (4.53 - 7.03)
Median duration [μs] (25-75 percentile) 714 (181 - 1548)

Event ID: 7930.241007093600.wav

Time: 2024-10-07 09:36UTC to 2024-10-07 09:42UTC

Event contains 438 original clicks, 219 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 131 clicks) .

Median statistics for 131 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.8
Median 3dB Center Frequency [kHz] 6.64
Median 10dB Center Frequency [kHz] 6.44
Median 3dB Bandwidth [kHz] (lower-upper) 1.2 (5.98 - 7.24)
Median 10dB Bandwidth [kHz] (lower-upper) 2.92 (4.98 - 7.88)
Median duration [μs] (25-75 percentile) 438 (166 - 1000)

Event ID: 7930.241007104200.wav

Time: 2024-10-07 10:42UTC to 2024-10-07 10:47UTC

Event contains 426 original clicks, 213 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 122 clicks) .

Median statistics for 122 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.74
Median 10dB Center Frequency [kHz] 5.8
Median 3dB Bandwidth [kHz] (lower-upper) 0.987 ( 5.2 - 6.2)
Median 10dB Bandwidth [kHz] (lower-upper) 2.57 (4.26 - 7.26)
Median duration [μs] (25-75 percentile) 1350 (1000 - 2190)

Event ID: 7930.241007105400.wav

Time: 2024-10-07 10:54UTC to 2024-10-07 11:00UTC

Event contains 568 original clicks, 284 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 168 clicks) .

Median statistics for 168 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6
Median 10dB Center Frequency [kHz] 5.91
Median 3dB Bandwidth [kHz] (lower-upper) 0.956 (5.48 - 6.46)
Median 10dB Bandwidth [kHz] (lower-upper) 2.54 (4.75 - 7.28)
Median duration [μs] (25-75 percentile) 433 (100 - 1072)

Event ID: 7930.241007113600.wav

Time: 2024-10-07 11:36UTC to 2024-10-07 11:42UTC

Event contains 806 original clicks, 403 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 201 clicks) .

Median statistics for 201 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.4
Median 3dB Center Frequency [kHz] 6.35
Median 10dB Center Frequency [kHz] 6.28
Median 3dB Bandwidth [kHz] (lower-upper) 0.96 (5.86 - 6.8)
Median 10dB Bandwidth [kHz] (lower-upper) 2.58 (4.99 - 7.62)
Median duration [μs] (25-75 percentile) 993 (289 - 1455)

Event ID: 7930.241007114200.wav

Time: 2024-10-07 11:42UTC to 2024-10-07 11:47UTC

Event contains 1488 original clicks, 744 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 406 clicks) .

Median statistics for 406 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.04
Median 10dB Center Frequency [kHz] 5.96
Median 3dB Bandwidth [kHz] (lower-upper) 1.04 (5.47 - 6.64)
Median 10dB Bandwidth [kHz] (lower-upper) 2.58 (4.46 - 7.3)
Median duration [μs] (25-75 percentile) 975 (425 - 1743)

Event ID: 7930.241007114800.wav

Time: 2024-10-07 11:48UTC to 2024-10-07 11:54UTC

Event contains 714 original clicks, 357 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 200 clicks) .

Median statistics for 200 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.87
Median 10dB Center Frequency [kHz] 5.9
Median 3dB Bandwidth [kHz] (lower-upper) 0.968 (5.35 - 6.47)
Median 10dB Bandwidth [kHz] (lower-upper) 2.47 (4.48 - 7.2)
Median duration [μs] (25-75 percentile) 1058 (287 - 1979)

Event ID: 7930.241007182400.wav

Time: 2024-10-07 18:24UTC to 2024-10-07 18:30UTC

Event contains 464 original clicks, 232 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 25 clicks) .

Median statistics for 25 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 14
Median 3dB Center Frequency [kHz] 11.9
Median 10dB Center Frequency [kHz] 12.1
Median 3dB Bandwidth [kHz] (lower-upper) 0.553 (11.5 - 12.4)
Median 10dB Bandwidth [kHz] (lower-upper) 1.24 (10.9 - 12.7)
Median duration [μs] (25-75 percentile) 63 (21 - 248)

Event ID: 7930.241007183000.wav

Time: 2024-10-07 18:30UTC to 2024-10-07 18:36UTC

Event contains 508 original clicks, 254 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 36 clicks) .

Median statistics for 36 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 12.2
Median 3dB Center Frequency [kHz] 10.6
Median 10dB Center Frequency [kHz] 10.8
Median 3dB Bandwidth [kHz] (lower-upper) 0.568 (10.3 - 11.2)
Median 10dB Bandwidth [kHz] (lower-upper) 1.14 (9.76 - 11.7)
Median duration [μs] (25-75 percentile) 77 (34 - 149)

Event ID: 7930.241007184800.wav

Time: 2024-10-07 18:48UTC to 2024-10-07 18:54UTC

Event contains 694 original clicks, 347 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 101 clicks) .

Median statistics for 101 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 12.4
Median 3dB Center Frequency [kHz] 10.7
Median 10dB Center Frequency [kHz] 11.4
Median 3dB Bandwidth [kHz] (lower-upper) 0.682 (10.2 - 11.3)
Median 10dB Bandwidth [kHz] (lower-upper) 2.6 (8.97 - 12.8)
Median duration [μs] (25-75 percentile) 185 (100 - 1000)

Event ID: 7930.241007185400.wav

Time: 2024-10-07 18:54UTC to 2024-10-07 19:00UTC

Event contains 838 original clicks, 419 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 202 clicks) .

Median statistics for 202 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 9
Median 3dB Center Frequency [kHz] 8.95
Median 10dB Center Frequency [kHz] 9.61
Median 3dB Bandwidth [kHz] (lower-upper) 1.12 (8.01 - 10.1)
Median 10dB Bandwidth [kHz] (lower-upper) 3.84 (5.84 - 11.5)
Median duration [μs] (25-75 percentile) 313 (100 - 1000)

Event ID: 7930.241007190000.wav

Time: 2024-10-07 19:00UTC to 2024-10-07 19:06UTC

Event contains 646 original clicks, 323 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 98 clicks) .

Median statistics for 98 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 11
Median 3dB Center Frequency [kHz] 10.5
Median 10dB Center Frequency [kHz] 10.6
Median 3dB Bandwidth [kHz] (lower-upper) 0.944 (9.57 - 11)
Median 10dB Bandwidth [kHz] (lower-upper) 3.14 (8.95 - 11.7)
Median duration [μs] (25-75 percentile) 214 (100 - 1000)

Event ID: 7930.241007213000.wav

Time: 2024-10-07 21:30UTC to 2024-10-07 21:36UTC

Event contains 860 original clicks, 430 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 163 clicks) .

Median statistics for 163 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 9.6
Median 3dB Center Frequency [kHz] 9.71
Median 10dB Center Frequency [kHz] 11
Median 3dB Bandwidth [kHz] (lower-upper) 1.29 (8.45 - 10.8)
Median 10dB Bandwidth [kHz] (lower-upper) 4.16 (6.65 - 14.3)
Median duration [μs] (25-75 percentile) 242 (100 - 1000)

Event ID: 7930.241007214200.wav

Time: 2024-10-07 21:42UTC to 2024-10-07 21:48UTC

Event contains 664 original clicks, 332 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 65 clicks) .

Median statistics for 65 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 8.8
Median 3dB Center Frequency [kHz] 10.4
Median 10dB Center Frequency [kHz] 12.1
Median 3dB Bandwidth [kHz] (lower-upper) 0.785 (9.59 - 11.7)
Median 10dB Bandwidth [kHz] (lower-upper) 2.75 (8.73 - 13.9)
Median duration [μs] (25-75 percentile) 141 (5 - 441)

Event ID: 7930.241007214800.wav

Time: 2024-10-07 21:48UTC to 2024-10-07 21:54UTC

Event contains 986 original clicks, 493 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 125 clicks) .

Median statistics for 125 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 8
Median 3dB Center Frequency [kHz] 8.33
Median 10dB Center Frequency [kHz] 9.17
Median 3dB Bandwidth [kHz] (lower-upper) 1.08 (7.37 - 9.28)
Median 10dB Bandwidth [kHz] (lower-upper) 2.89 (6.52 - 11)
Median duration [μs] (25-75 percentile) 321 (13 - 1228)

Event ID: 7930.241007215400.wav

Time: 2024-10-07 21:54UTC to 2024-10-07 21:59UTC

Event contains 864 original clicks, 432 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 125 clicks) .

Median statistics for 125 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 8.4
Median 3dB Center Frequency [kHz] 8.76
Median 10dB Center Frequency [kHz] 9.49
Median 3dB Bandwidth [kHz] (lower-upper) 1.1 (8.09 - 10.1)
Median 10dB Bandwidth [kHz] (lower-upper) 2.33 (7.13 - 11.3)
Median duration [μs] (25-75 percentile) 276 (5 - 1000)

Event ID: 7930.241007220000.wav

Time: 2024-10-07 22:00UTC to 2024-10-07 22:06UTC

Event contains 770 original clicks, 385 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 82 clicks) .

Median statistics for 82 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 8.4
Median 3dB Center Frequency [kHz] 9.2
Median 10dB Center Frequency [kHz] 9.47
Median 3dB Bandwidth [kHz] (lower-upper) 0.727 ( 8.7 - 9.89)
Median 10dB Bandwidth [kHz] (lower-upper) 2.49 (7.47 - 11)
Median duration [μs] (25-75 percentile) 257 (100 - 1000)

Event ID: 7930.241007220600.wav

Time: 2024-10-07 22:06UTC to 2024-10-07 22:12UTC

Event contains 528 original clicks, 264 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 88 clicks) .

Median statistics for 88 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 9.2
Median 3dB Center Frequency [kHz] 9.75
Median 10dB Center Frequency [kHz] 10.7
Median 3dB Bandwidth [kHz] (lower-upper) 1.5 (8.22 - 10.9)
Median 10dB Bandwidth [kHz] (lower-upper) 5.13 (6.07 - 13.3)
Median duration [μs] (25-75 percentile) 159 (40 - 1000)

Event ID: 7930.241007221200.wav

Time: 2024-10-07 22:12UTC to 2024-10-07 22:18UTC

Event contains 578 original clicks, 289 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 72 clicks) .

Median statistics for 72 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 9
Median 3dB Center Frequency [kHz] 9.16
Median 10dB Center Frequency [kHz] 11.2
Median 3dB Bandwidth [kHz] (lower-upper) 1.39 (8.18 - 10.5)
Median 10dB Bandwidth [kHz] (lower-upper) 6.69 (6.63 - 13.6)
Median duration [μs] (25-75 percentile) 164 (100 - 1000)

Event ID: 7930.241008033600.wav

Time: 2024-10-08 03:36UTC to 2024-10-08 03:42UTC

Event contains 1372 original clicks, 686 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 379 clicks) .

Median statistics for 379 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.4
Median 3dB Center Frequency [kHz] 6.56
Median 10dB Center Frequency [kHz] 6.52
Median 3dB Bandwidth [kHz] (lower-upper) 1.09 (5.98 - 7.17)
Median 10dB Bandwidth [kHz] (lower-upper) 2.78 ( 5.1 - 7.87)
Median duration [μs] (25-75 percentile) 532 (201 - 1014)

Event ID: 7930.241008034200.wav

Time: 2024-10-08 03:42UTC to 2024-10-08 03:47UTC

Event contains 1692 original clicks, 846 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 498 clicks) .

Median statistics for 498 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.8
Median 3dB Center Frequency [kHz] 6.59
Median 10dB Center Frequency [kHz] 6.51
Median 3dB Bandwidth [kHz] (lower-upper) 1.1 (5.98 - 7.23)
Median 10dB Bandwidth [kHz] (lower-upper) 2.84 (5.04 - 7.96)
Median duration [μs] (25-75 percentile) 564 (236 - 1011)

Event ID: 7930.241008034800.wav

Time: 2024-10-08 03:48UTC to 2024-10-08 03:54UTC

Event contains 794 original clicks, 397 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 188 clicks) .

Median statistics for 188 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.8
Median 3dB Center Frequency [kHz] 6.73
Median 10dB Center Frequency [kHz] 6.59
Median 3dB Bandwidth [kHz] (lower-upper) 1.09 (6.15 - 7.32)
Median 10dB Bandwidth [kHz] (lower-upper) 2.78 (5.12 - 8.03)
Median duration [μs] (25-75 percentile) 748 (208 - 1231)

Event ID: 7930.241008080600.wav

Time: 2024-10-08 08:06UTC to 2024-10-08 08:12UTC

Event contains 1190 original clicks, 595 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 414 clicks) .

Median statistics for 414 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.05
Median 10dB Center Frequency [kHz] 5.99
Median 3dB Bandwidth [kHz] (lower-upper) 1.13 ( 5.4 - 6.73)
Median 10dB Bandwidth [kHz] (lower-upper) 2.65 (4.61 - 7.34)
Median duration [μs] (25-75 percentile) 920 (282 - 1251)

Event ID: 7930.241008094200.wav

Time: 2024-10-08 09:42UTC to 2024-10-08 09:47UTC

Event contains 802 original clicks, 401 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 165 clicks) .

Median statistics for 165 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.77
Median 10dB Center Frequency [kHz] 5.81
Median 3dB Bandwidth [kHz] (lower-upper) 0.848 (5.28 - 6.23)
Median 10dB Bandwidth [kHz] (lower-upper) 2.21 (4.49 - 6.89)
Median duration [μs] (25-75 percentile) 699 (141 - 1330)

Event ID: 7930.241008233000.wav

Time: 2024-10-08 23:30UTC to 2024-10-08 23:36UTC

Event contains 420 original clicks, 210 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 131 clicks) .

Median statistics for 131 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 9.6
Median 3dB Center Frequency [kHz] 9.42
Median 10dB Center Frequency [kHz] 11
Median 3dB Bandwidth [kHz] (lower-upper) 1.63 (8.47 - 10.3)
Median 10dB Bandwidth [kHz] (lower-upper) 8.25 ( 6.1 - 15.3)
Median duration [μs] (25-75 percentile) 550 (129 - 1103)

Event ID: 7930.241009021800.wav

Time: 2024-10-09 02:18UTC to 2024-10-09 02:24UTC

Event contains 410 original clicks, 205 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 53 clicks) .

Median statistics for 53 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 15.2
Median 3dB Center Frequency [kHz] 11
Median 10dB Center Frequency [kHz] 11.1
Median 3dB Bandwidth [kHz] (lower-upper) 0.602 (10.6 - 11.3)
Median 10dB Bandwidth [kHz] (lower-upper) 1.39 (10.1 - 12)
Median duration [μs] (25-75 percentile) 47 (31 - 328)

Event ID: 7930.241009022400.wav

Time: 2024-10-09 02:24UTC to 2024-10-09 02:30UTC

Event contains 478 original clicks, 239 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 61 clicks) .

Median statistics for 61 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 14
Median 3dB Center Frequency [kHz] 11.6
Median 10dB Center Frequency [kHz] 12
Median 3dB Bandwidth [kHz] (lower-upper) 0.635 (11.3 - 11.8)
Median 10dB Bandwidth [kHz] (lower-upper) 1.89 (11.1 - 12.8)
Median duration [μs] (25-75 percentile) 362 (100 - 1000)

Event ID: 7930.241009023000.wav

Time: 2024-10-09 02:30UTC to 2024-10-09 02:35UTC

Event contains 1132 original clicks, 566 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 156 clicks) .

Median statistics for 156 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 10.4
Median 3dB Center Frequency [kHz] 10.1
Median 10dB Center Frequency [kHz] 10.2
Median 3dB Bandwidth [kHz] (lower-upper) 0.701 (9.61 - 10.4)
Median 10dB Bandwidth [kHz] (lower-upper) 2.41 (8.74 - 11.8)
Median duration [μs] (25-75 percentile) 579 (130 - 1000)

Event ID: 7930.241009023600.wav

Time: 2024-10-09 02:36UTC to 2024-10-09 02:41UTC

Event contains 814 original clicks, 407 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 94 clicks) .

Median statistics for 94 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 9.2
Median 3dB Center Frequency [kHz] 9.38
Median 10dB Center Frequency [kHz] 9.53
Median 3dB Bandwidth [kHz] (lower-upper) 0.627 (9.11 - 9.76)
Median 10dB Bandwidth [kHz] (lower-upper) 1.49 (8.28 - 10.5)
Median duration [μs] (25-75 percentile) 342 (22 - 1000)

Event ID: 7930.241009024800.wav

Time: 2024-10-09 02:48UTC to 2024-10-09 02:53UTC

Event contains 1094 original clicks, 547 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 308 clicks) .

Median statistics for 308 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 5.92
Median 10dB Center Frequency [kHz] 5.75
Median 3dB Bandwidth [kHz] (lower-upper) 0.962 (5.35 - 6.5)
Median 10dB Bandwidth [kHz] (lower-upper) 2.51 (4.35 - 7.08)
Median duration [μs] (25-75 percentile) 1940 (1000 - 2377)

Event ID: 7930.241009025400.wav

Time: 2024-10-09 02:54UTC to 2024-10-09 03:00UTC

Event contains 840 original clicks, 420 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 249 clicks) .

Median statistics for 249 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.16
Median 10dB Center Frequency [kHz] 6.05
Median 3dB Bandwidth [kHz] (lower-upper) 0.937 (5.64 - 6.67)
Median 10dB Bandwidth [kHz] (lower-upper) 2.28 (4.82 - 7.22)
Median duration [μs] (25-75 percentile) 1963 (1238 - 2375)

Event ID: 7930.241009031200.wav

Time: 2024-10-09 03:12UTC to 2024-10-09 03:18UTC

Event contains 520 original clicks, 260 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 173 clicks) .

Median statistics for 173 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6
Median 3dB Center Frequency [kHz] 6.17
Median 10dB Center Frequency [kHz] 6.12
Median 3dB Bandwidth [kHz] (lower-upper) 1.03 (5.52 - 6.82)
Median 10dB Bandwidth [kHz] (lower-upper) 2.87 (4.63 - 7.62)
Median duration [μs] (25-75 percentile) 1236 (326 - 1903)

Event ID: 7930.241009031800.wav

Time: 2024-10-09 03:18UTC to 2024-10-09 03:24UTC

Event contains 432 original clicks, 216 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 127 clicks) .

Median statistics for 127 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.4
Median 3dB Center Frequency [kHz] 6.24
Median 10dB Center Frequency [kHz] 6.19
Median 3dB Bandwidth [kHz] (lower-upper) 0.993 (5.81 - 6.85)
Median 10dB Bandwidth [kHz] (lower-upper) 2.61 (4.94 - 7.64)
Median duration [μs] (25-75 percentile) 1220 (285 - 2063)

Event ID: 7930.241009174201.wav

Time: 2024-10-09 17:42UTC to 2024-10-09 17:48UTC

Event contains 442 original clicks, 221 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 58 clicks) .

Median statistics for 58 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 10.8
Median 3dB Center Frequency [kHz] 9.8
Median 10dB Center Frequency [kHz] 10.2
Median 3dB Bandwidth [kHz] (lower-upper) 0.833 (9.01 - 10.3)
Median 10dB Bandwidth [kHz] (lower-upper) 3.68 (7.68 - 12.4)
Median duration [μs] (25-75 percentile) 111 (48 - 256)

Event ID: 7930.241011213601.wav

Time: 2024-10-11 21:36UTC to 2024-10-11 21:42UTC

Event contains 1796 original clicks, 898 valid clicks after filtering.

Click plots and table

SNR histogram includes all filtered clicks. Other plots contain only clicks with SNR >= 15 dB (n = 532 clicks) .

Median statistics for 532 high SNR clicks with SNR >= 15 dB.
parameter value
Median Peak Frequency [kHz] 6.4
Median 3dB Center Frequency [kHz] 6.27
Median 10dB Center Frequency [kHz] 6.76
Median 3dB Bandwidth [kHz] (lower-upper) 1.26 (5.54 - 7.11)
Median 10dB Bandwidth [kHz] (lower-upper) 4.72 (3.71 - 9.4)
Median duration [μs] (25-75 percentile) 472 (100 - 1000)

Clean up Event Table

# clean up the event table
evTable <- evTable[evTable$keep == TRUE,]
evTable <- subset(evTable, select = -keep)
# save event table as CSV
write.csv(evTable, file = file.path(params$path_dets, 
                                    paste0('eventTable_', params$mission, '_', 
                                           params$drift, '_', Sys.Date(),'.csv')))

#dbDisconnect(dbFile)

After additional filtering based on median peak frequency, 47 events events of 1121 original events remain.